<?php

namespace app\order\controller;

use app\common\controller\PCBase;
use app\BaseController;//测试专用
use app\order\logic\OrderReportDailyLogic;
use think\facade\Db;
use Throwable;
use app\common\library\Upload;

class OrderReportDaily extends PCBase
{


    public function initialize(): void
    {
        parent::initialize();
    }

    /**
     * index
     * @throws Throwable
     */
    public function index()
    {
        $params                = $this->request->post();
        $OrderReportDailyLogic = new OrderReportDailyLogic();
        //update 2024-10-17 获取ID信息;
        $adminId               = $this->getAdminId();
        $groupId               = $this->getAdminGroupId();
        $params['adminId']     = $adminId;
        $params['groupId']     = $groupId;
        return $OrderReportDailyLogic->index($params);
    }


    public function getRoleId(){
        $groupId   = $this->getAdminGroupId();
        return $this->jsonMessage(200,true,'获取成功',['group_id'=>$groupId]);
    }



    /**
     * export
     * @throws Throwable
     */
    public function export()
    {
        $params     = $this->request->post();
        $OrderReportDailyLogic = new OrderReportDailyLogic();
        //update 2024-10-17 获取ID信息;
        $adminId               = $this->getAdminId();
        $groupId               = $this->getAdminGroupId();
        $params['adminId']     = $adminId;
        $params['groupId']     = $groupId;
        return $OrderReportDailyLogic->export($params);
    }

    /**
     * info
     * @throws Throwable
     */
    public function info()
    {
        $params                = $this->request->post();
        $adminId               = $this->getAdminId();
        $params['adminId']     = $adminId;
        return (new OrderReportDailyLogic())->info($params);
    }

    /**
     * info
     * @throws Throwable
     */
    public function skuinfo()
    {
        $params     = $this->request->post();
        $OrderReportDailyLogic = new OrderReportDailyLogic();
        return $OrderReportDailyLogic->skuinfo($params);
    }

    /**
     * info
     * @throws Throwable
     */
    public function advertising_real_list()
    {
        $params     = $this->request->post();
        $OrderReportDailyLogic = new OrderReportDailyLogic();
        return $OrderReportDailyLogic->advertising_real_list($params);
    }

    /**
     * index
     * @throws Throwable
     */
    public function RealTimeTodayInfo()
    {
        $params                = $this->request->post();
        $OrderReportDailyLogic = new OrderReportDailyLogic();
        return $OrderReportDailyLogic->RealTimeTodayInfo($params);
    }

    

    /**
     * export
     * @throws Throwable
     */
    public function exportReportDay()
    {
        $params     = $this->request->post();
        $OrderReportDailyLogic = new OrderReportDailyLogic();
        return $OrderReportDailyLogic->exportReportDay($params);
    }

}
